A “persistent reservation” SCSI command is used by an initiator in a data network to reserve logical units at a target device. To utilize the persistent reservation, an initiator registers with a target device and receives a reservation key. When the initiator wishes to reserve the target for a particular purpose, the initiator sends the reservation key in a Persistent Reserve Out command. If the persistent reservation requested in the command does not conflict with another persistent reservation or reservation established using the older RESERVE command, the reservation is made at the target device. The Persistent Reserve Out command contains fields that specify the persistent reservation action, the intended scope of the reservation and the restrictions caused by the persistent reservation.
Example actions that can be taken with a Persistent Reserve Out command include Register, Reserve, Release, Clear Preempt, and Preempt and Clear. The Register action either requests a reservation key or modifies a reservation key for an initiator with the target device. A device server program within the target device maintains this key for the initiator until the initiator updates the key with a new Persistent Reserve Out command. The Reserve action creates a persistent reservation having a specified type and scope. The types of persistent reservations include Read Shared, Write Exclusive, Read Exclusive Access and Shared Access. The scope of the reservation specifies whether the reservation applies to the entire logical unit. A Persistent Reservation Out command with a Reserve action is rejected if the initiator has not registered with the target device (or device server). A Persistent Reserve Out with a Release Action removes a persistent reservation held by the same initiator. A Clear action removes all persistent reservations held by all initiators. A Preempt action removes all persistent reservations from an initiator identified in the parameter list of the Persistent Reserve Out commands, but commands already received from the specified initiator will be processed. The Preempt and Clear action, on the other hand will not only remove all persistent reservation for the specified initiator, but will also cause commands that have already been received from that initiator to be aborted.
To help coordinate reservations, initiators can issue a Persistent Reserve In command to a target device to determine if the target device has registered any initiators and has any active reservations. In response to the Persistent Reserve In command requesting reservation keys, the target device can return a list of all keys registered with the target device and, in response to a Persistent Reserve In command requesting reservations, the target device can return a list of all the active reservations (e.g., type and scope) active at the target device. The ability to see registered keys and active reservations can prevent an initiator from trying to register a conflicting key or submitting a conflicting reservation.
In recent years, data communication systems have developed in which multiple initiators in one SCSI domain may appear as a single initiator from the perspective of a target device in a second SCSI domain. In fibre channel storage area networks (“SAN”), for example, multiple fibre channel initiators may communicate with a SCSI hard disk library through a fibre channel-to-SCSI router. In this case, the hard disk library would see the fibre channel-to-SCSI router as the initiator of commands on the SCSI bus, regardless of the fibre channel initiator from which the command originated. In current systems such as this, persistent reservations are not handled, and reservations occur using the older Reserve/Release model if reservations are supported at all.